package com.huanghuai.retail.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;


import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;


/**
 *
 */
@TableName(value ="s_storage")
@Data
public class Storage implements Serializable {
    /**
     *
     */
    @TableId
    private Long id;

    /**
     * 仓库名称
     */

    private String storageName;

    /**
     * 管理员id
     */
//    @NotNull(message = "管理员id不能为空")
    private Long adminId;

    /**
     * 仓库位置
     */
    private String storageAddress;

    /**
     * 仓库座机电话(固定电话)
     */
   @Pattern(regexp = "^((13[0-9])|(14[579])|(15([0-3]|[5-9]))|(16[56])|(17[0-8])|(18[0-9])|(19[1589]))\\d{8}$"
       ,message = "手机号码格式不正确")
    private String storageTel;

    /**
     * 备注
     */
    private String comment;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private String adminName;
}
